<template>
	<view class="accessories-item">
		<view class="title-price">
			<view class="accessorie-title">{{accessorieTitle}}</view>
			<view class="accessorie-price">￥{{accessoriePrice}}</view>
		</view>
		<uni-number-box class="chageNumber" @change="changeValue" :value="0" background="#ffb612" color="#fff" />
	</view>
</template>


<script>
	export default {
		components: {},
		data() {
			return {
				numberValue: 0,
			}
		},
		methods: {
			changeValue(value) {
				// console.log('返回数值：', value);
				this.$emit("changeValue", value, this.partName);
			},


		},
		props: {
			accessorieTitle: {
				type:String,
				default: ""
			},
			accessoriePrice: {
				type:Number,
				default: ""
			},
			partName:{
				type:String,
				default: ""
			}
		}
	}
</script>


<style lang="scss" scoped>
	.accessories-item {
		margin: 20rpx 0;
		background-color: #6c6c6c;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 10rpx;
		border-radius: 10rpx;
		border: 3rpx solid #9a9a9a;

		.title-price {
			.accessorie-title {
				color: #ffffff;
				font-weight: 600;
			}

			.accessorie-price {
				color: #cecece;
			}
		}

		.chageNumber {
			height: 52rpx;
		}
	}
</style>
